#pragma once

#include <vector>
#include <graphic/intype.h>
#include <renderer/color.h>


BEGIN_NAMESPACE_OXGE


class RENDERER_TRANSFER Material : public oxgeClass<Material>
{
public:


	Material(){ 
		m_ambient = DefaultAmbient; 
		m_diffuse = DefaultDiffuse; 
		m_emission = DefaultEmission; 
		m_sepcular = DefaultSepcular; 
		m_shiness = DefaultShiness; 
		m_opacity = DefaultOpacity;
	}

	Material& SetAmbient(const ColorRGBA& ambientColor){ m_ambient = ambientColor; return *this; }
	Material& SetDiffuse(const ColorRGBA& diffuseColor){ m_diffuse = diffuseColor; return *this; }
	Material& SetSpecular(const ColorRGBA& sepcularColor){ m_sepcular = sepcularColor; return *this; }
	Material& SetShiness(const float& shiness){ m_shiness = shiness; return *this; }
	Material& SetEmission(const ColorRGBA& emissionColor){ m_emission = emissionColor;  return *this; } 
	Material& SetOpacity(const float& opacity){ m_opacity = opacity; return *this; }
	
public:
	ColorRGBA m_ambient;
	ColorRGBA m_diffuse;
	ColorRGBA m_sepcular;
	ColorRGBA m_emission;
	float m_shiness;//clamp shiness[0,1]	
	float m_opacity;

	const static ColorRGBA DefaultAmbient;
	const static ColorRGBA DefaultDiffuse;
	const static ColorRGBA DefaultSepcular;	
	const static ColorRGBA DefaultEmission;
	const static float DefaultShiness;
	const static float DefaultOpacity;

	const static Material DefaultMaterial;
};



END_NAMESPACE_OXGE